package com.example.service.imp;

import com.example.dao.EmployeeDao;
import com.example.entity.EmployeeEntity;
import com.example.service.EmployeeService;
import org.hibernate.criterion.DetachedCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class EmployeeServiceImp implements EmployeeService {

    @Autowired
    EmployeeDao employeeDao;
    @Override
    public List<EmployeeEntity> getEmployeeList() {
        DetachedCriteria detachedCriteria=DetachedCriteria.forClass(EmployeeEntity.class);

        return employeeDao.getEmployeeList(detachedCriteria);
    }
}
